import { NgModule } from '@angular/core';
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
import { StartAppGuard } from 'src/core/start-app.guard';

const routes: Routes = [
  {
    path: '',
    redirectTo: 'login',
    pathMatch: 'full'
  },
  {
    path: 'welcome',
    loadChildren: () => import('./welcome/welcome.module').then( m => m.WelcomePageModule),
    canActivate: [StartAppGuard]
  },
  {
    path: 'register',
    loadChildren: () => import('./register/register.module').then( m => m.RegisterPageModule)
  },
  {
    path: 'login',
    loadChildren: () => import('./login/login.module').then( m => m.LoginPageModule)
  },
 
  {
    path: 'home',
    loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule)
  },
 
  {
    path: 'start',
    loadChildren: () => import('./tab1/pages/SignIn/start/start.module').then( m => m.StartPageModule)
  },


  {
    path: 'sign-in',
    loadChildren: () => import('./tab1/pages/SignIn/sign-in/sign-in.module').then( m => m.SignInPageModule)
  },
  {
    path: 'stu-sign-in',
    loadChildren: () => import('./tab1/pages/SignIn/stu-sign-in/stu-sign-in.module').then( m => m.StuSignInPageModule)
  },

 
 

 
  {
    path: 'setting',
    loadChildren: () => import('./tab3/pages/setting/setting.module').then( m => m.SettingPageModule)
  },

  {
    path: 'change-password',
    loadChildren: () => import('./tab3/pages/change-password/change-password.module').then( m => m.ChangePasswordPageModule)
  },
  {
    path: 'forget-pwd',
    loadChildren: () => import('./forget-pwd/forget-pwd.module').then( m => m.ForgetPwdPageModule)
  },
  {
    path: 'full-user-info',
    loadChildren: () => import('./full-user-info/full-user-info.module').then( m => m.FullUserInfoPageModule)
  },


];
@NgModule({
  imports: [
    RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
  ],
  exports: [RouterModule]
})
export class AppRoutingModule {}
